package io.hepu.robotize.aop;

import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

import java.lang.annotation.*;

@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Order(Ordered.HIGHEST_PRECEDENCE)
public @interface RequestLimit {
    // Request times allowed in period, default 15.
    int times() default 15;

    // Specify period, default 60 seconds.
    long period() default 60 * 1000;
}
